package main.java;

/**
 * 将构造函数替换为工厂函数
 */
public class Employee {

    private int type;
    static final int ENGINEER=0;
    static final int SALESMAN = 1;
    static final int MANAGER=2;

    public Employee(int type) {
        this.type = type;
    }

    static Employee create(int type) {
        return new Employee(type);
    }
}
